<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cache;

class CacheController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
    	// proteced by middle ware auth
        $this->middleware('auth');
    }

    /**
     * create a controller to show how to work predis
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
    public function index()
    {
    	for ($i = 0; $i < 100; $i ++) {
    		Cache::put($i, random_int(0, 100), random_int(1,20));
	    }
    }

    public function show()
    {
    }


}
